home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Unbuffered character
- Date: 4 Feb 1996 08:30:39 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4f2mvfINNm4e@keats.ugrad.cs.ubc.ca>
- References: <4f0uul$akt@gail.ripco.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4f0uul$akt@gail.ripco.com>,
- Martin Ambuhl <mambuhl@ripco.com> wrote:
- >jagrant@emr1.emr.ca (John Grant)
- >in <DM2zCI.379@emr1.emr.ca writes:
- > Lines: 34
- >
- > In article <4ep3a1$bee@hacgate2.hac.com c llins@thor.tu.hac.com (Ron C
- > rites:
- > There is no portable way to get unbuffered input, since C can't
- > possibly knew all about the dozens or hundreds of different
- > terminal types available on all the machines made around the
- > world.
- >
- > For best results (i.e., least evil alternative), check out the
- > "curses" library available for your machine. Most common
- > flavors can be had for free from any SimTel mirror.
- >
- > Does 'portability' or 'least evil' imply that everything that is
- > not ANSI C be routed through a local version of a UNIX library?
- >
- >Mr. Grant is, I suppose, continuing his attack on "elitism" with this.
- >Since he does not seem to know, and others may not either, there are a
- >number of DOS version of curses available. It is not ANSI C, and is
- >often not the best choice for any particular platform. It is, however,
-
- Yep. It's not UNIX elitism that drives one to choose libraries that originated
- under UNIX. It's just that these are more often available in freely distributed
- form, have more portable semantics, are better documented and supported and
- more mature and well-entrenched.
-
- Porting {DOS, Mac, Windoze, ...} libraries to ther systems is not always as
- easy because they may be peppered with assumptions operating system details,
- machine architecture, memory layout and so forth.
-
- Sources may not be available, whereas in the UNIX world, cloning proprietary
- code with freeware code is common. The GNU project has a freeware replacement
- for every major UNIX tool, save for things like OS-specific administration
- utilities. Some people want to use these tools on other systems. Entire
- libraries are freely available, making them prime candidates for porting for a
- programmer who wants cross-platoform functionality. For example, ncurses is a
- freeware clone of SVR4 curses. It's a very good quality clone that rivals the
- original, too.
-
- In a recent project that involves UNIX and Windows platforms, my teammates and
- I have had to port quite a few things to Windows/Winsock that have no
- equivalent in the 16-bit world; XDR (for encapsulating data structures in a
- machine-independent manner) and LibDES (DES encryption) come to mind.
-
- I don't see how any of this is a form of elitism. When someone hands me quality
- freeware source code for my benefit, I'd hardly call him an elitist. If he
- required me to attend a $2000 seminar and sign up with a support network before
- certifying me to use his product, forced me to buy documentation, development
- tools and license the code---then I would call him an elitist.
-
- >widely available on almost all platforms and performs adequately for
- >most tasks. It is a 'least evil' because it is the closest we have to a
- >portable solution.
-
- Right.
- --
-
-